package com.jikangjun.disk.myshare.service;

import com.jikangjun.disk.mybatis.flexigrid.PagingEntity;
import com.jikangjun.disk.mybatis.flexigrid.TblResponseEntity;
import com.jikangjun.disk.myshare.entity.SearchShareEntity;
import com.jikangjun.disk.myshare.entity.ShareEntity;

/**
 * 分享服务接口
 */
public interface ShareService {
    
    /**
     * 分页查询用户分享记录
     */
    TblResponseEntity<ShareEntity> queryShareInfoListByPage(SearchShareEntity entity, PagingEntity paging);
    
    /**
     * 根据分享ID查询分享信息
     */
    ShareEntity queryShareInfoById(String shareId);
    
    /**
     * 根据分享链接查询分享信息
     */
    ShareEntity queryShareInfoByLink(String shareLink);
    
    /**
     * 创建分享
     */
    ShareEntity createShare(ShareEntity entity);
    
    /**
     * 更新分享信息
     */
    void updateShareInfo(ShareEntity entity);
    
    /**
     * 取消分享
     */
    void cancelShare(String shareId);
    
    /**
     * 批量取消分享
     */
    void cancelShareBatch(String[] shareIds);
    
    /**
     * 删除分享记录
     */
    void deleteShare(String shareId);
    
    /**
     * 批量删除分享记录
     */
    void deleteShareBatch(String[] shareIds);
    
    /**
     * 更新下载次数
     */
    void updateDownloadCount(String shareId);
    
    /**
     * 更新查看次数
     */
    void updateViewCount(String shareId);
    
    /**
     * 生成分享链接
     */
    String generateShareLink();
    
    /**
     * 生成分享码
     */
    String generateShareCode();
} 